package com.more.offer.designpatterns.adapter.adapter1;

/**
 * @author pinoc
 * @date 2021/10/27
 * @description
 */
public class SquarePeg {
	private double width;

	public SquarePeg(double width) {
		this.width = width;
	}

	public double getWidth() {
		return width;
	}

	public void setWidth(double width) {
		this.width = width;
	}

	public double getDoubleSquare() {
		if(width > 0) {
			return Math.pow(width, 2);
		}
		return 0;
	}
}
